<template>
    <div class="topMenu">
      <div class="logoImg">
        <img src="../assets/logo.png"/>
      </div>
      <el-menu
         default-active="1"
         @select="selectTopMenu"
        class="topMenuHtml"
        mode="horizontal"
        background-color="#545C64"
        text-color="#fff"
        active-text-color="#23bca1">
        <el-menu-item index="1">消息中心</el-menu-item>
        <el-submenu index="2">
          <template slot="title">孟繁胜游</template>
          <el-menu-item index="2-1">退出</el-menu-item>
        </el-submenu>
      </el-menu>
    </div>
</template>

<script>

    export default {
      data(){
        return{

        }
      },
      methods:{
         selectTopMenu(index, indexPath) {
            console.log(index+"---"+indexPath);
            if(index == "2-1"){
              this.$router.push({path:'/',query:{id:'exit'}})
            }
          },
      }
    }
</script>